-- GENERATED SPELL FOR [Royal Guard] --


function spell0_20672(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40505,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20672', 634, 1)
end

function spell1_20672(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_20672', 618, 1)
end

function Sorts_20672(pUnit, Event)
local choix_sorts_20672 = math.random(0, 1)
if choix_sorts_20672 == 0 then
pUnit:RegisterEvent('spell0_20672', 1, 1)
end
if choix_sorts_20672 == 1 then
pUnit:RegisterEvent('spell1_20672', 1, 1)
end
end

function mob20672_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20672', math.random(1500, 3000), 1)
end

function mob20672_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20672_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20672_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20672, 1, 'mob20672_Action')
RegisterUnitEvent(20672, 2, 'mob20672_Leave')
RegisterUnitEvent(20672, 3, 'mob20672_Kill')
RegisterUnitEvent(20672, 4, 'mob20672_Die')
